package com.zxl.utils;

import org.springframework.security.crypto.bcrypt.BCrypt;

/**
 * @packageName com.zxl.utils
 * @ClassName
 * @Author zxl
 * @Description //TODO
 * @date
 **/
public class PasswordUtils {

    public static String enCode(String pwd){
        return BCrypt.hashpw(pwd,BCrypt.gensalt());
    }

    public static boolean check(String fpwd,String pwd){
        return BCrypt.checkpw(fpwd,pwd);
    }

}
